<div id='product-selected-body'>
<{include file="finder/input-row.html" app="material"}>
</div>
<{area inject=".mainFoot"}>
<div class='table-action'>
    <{button label='确定' id='primary-btn' onclick='change_feature_groups();'}>
</div>
<{/area}>
<script>
function change_feature_groups()
{
    var handle = $('hand-selected-product').getPrevious('div');
    var length = $('product-selected-body').getElements('.row').length;
    if(length <= 0){
        handle.getElement('input[type=hidden]').set('value','');
        handle.getElement('.label').setText('选取类目');
    }
    var html = '已选择了'+length+'个类目,'+"<a href='javascript:void(0);' onclick='feature_group_selected_show();'>查看选中的类目.</a>";
    $('hand-selected-product').setHTML(html);
    $('primary-btn').getParent('.dialog').retrieve('instance').close();
}
</script>